import { http } from '@/utils/http'
import type { User } from '@/types/orderList'
import type { CommentParam } from '@/types/sys/comment'
import type { comment } from '@/types/docter/comment'


/**
 * 通过病例id找到对应的医生信息
 * @param chId
 */
export const getUserByChIdAPI = (chId: string) => {
  return http<User>({
    url: `/docter/api/comment/getUserByChId/${chId}`,
  })
}

/**
 * 对医生进行添加评论
 */
export const insertCommentAPI = (data: CommentParam) => {
  return http<User>({
    url: `/docter/api/comment/insertComment`,
    method: 'POST',
    data,
  })
}

/**
 * 根据医生Id查询评论数
 */
export const getComment = (id:string) => {
  return http<comment>({
    url: `/docter/api/comment/getUserCommentById/${id}`,
    method: 'GET',
  })
}
